
package threadlogging.log4j;

import java.util.Hashtable;
import java.util.Iterator;

import org.apache.log4j.MDC;

public class Log4jUtil
{
	public static void clearMDC()
	{
		Hashtable htable = MDC.getContext();
		if (htable != null)
		{
			Iterator keyIterator = htable.keySet().iterator();
			while (keyIterator.hasNext())
			{
				String key = (String) keyIterator.next();
				MDC.remove(key);
			}
		}
	}
	
}
